package cn.lizemin.observer.origin.entity;

/**
 * @author lzm
 * @version 1.0
 * @description: TODO
 * @date 2022/4/20 11:22
 */
public class Buyer {

    /**买家姓名*/
    private String name ;

    private Shop shop;

    public Buyer(String name, Shop shop) {
        this.name = name;
        this.shop = shop;
    }

    public void buy() {
        System.out.println(name +"买了" + shop.getProduct());

    }

}
